Skip to content

feat(trace): production hardening — re-baseline to v0.2.0 + OSS hygiene#7

Merged
Patel230 merged 2 commits into
devfrom
feat/trace-production-hardening
May 16, 2026
Merged

feat(trace): production hardening — re-baseline to v0.2.0 + OSS hygiene#7
Patel230 merged 2 commits into
devfrom
feat/trace-production-hardening

Conversation

@Patel230
Copy link
Copy Markdown
Contributor

Summary

Production-hygiene pass for trace that brings the repo to top-50 OSS
repository standards. Single commit targeting dev.

The mandate (per GOAL.md) is that trace be the reference Go session
observability tool for AI coding agents
, comparable in quality to
langfuse, langsmith, phoenix (arize), openllmetry, traceloop, helicone,
braintrust, and lunary, and built for solo developers who run their
coding agent locally.

Unlike the other hawk-eco repos, trace already had CODE_OF_CONDUCT.md,
CONTRIBUTING.md, dependabot.yml, CODEOWNERS, and three issue
templates. This PR fills in the three remaining gaps and aligns the
version baseline.

Changes

Version 0.2.0

File Change
cmd/trace/cli/versioninfo/versioninfo.go var Version = "0.2.0" (the source-of-truth default; build-time -ldflags continues to override for releases)

The various cli_version: "0.x.y" strings inside test fixtures
(cmd/trace/cli/checkpoint/v2_*_test.go,
cmd/trace/cli/transcript/compact/pi_test.go) are intentionally
unchanged
— they represent the version of trace that wrote a stored
checkpoint and exist precisely to verify backward-compatible read paths
work even when newer code reads older data.

CHANGELOG.md

Added ## [Unreleased] describing the re-baseline and the three new
files. Existing 0.1.0 entry preserved.

New files

File Purpose
.gitattributes LF normalization (matches WINDOWS.md — Windows-only *.bat/*.cmd/*.ps1 keep CRLF), binary detection, GitHub linguist hints (collapse go.sum, .opencode/package-lock.json, .opencode/bun.lock in PR diffs; mark docs/**, AGENTS.md, CLAUDE.md, WINDOWS.md as documentation so language stats reflect Go)
.editorconfig UTF-8, LF, final newline, trim trailing whitespace by default; tabs for Go + Makefile, 2-space indent for YAML/JSON/TOML/shell, no-trim for Markdown (preserves the trailing-2-spaces line-break syntax)
.github/PULL_REQUEST_TEMPLATE.md Summary / Changes / Privacy & redaction impact / Agent compatibility / Testing / Checklist

The PR template has two trace-specific sections worth calling out:

  • Privacy & redaction impact — every change in redact/ can leak
    PII or secrets if regressed, so the template asks for explicit
    before/after go test ./redact/... results when redaction code is
    touched.
  • Agent compatibility — trace integrates with seven different
    coding agents (Claude Code, Codex, Gemini CLI, OpenCode, Cursor,
    Factory AI Droid, Copilot CLI). The template asks contributors to
    list which agents they tested against and call out any they could
    not.

Verification

Check Status
go build ./... ✅ clean
go vet ./... ✅ clean
go test -race -count=1 -timeout=300s ./perf/... ./redact/... ./cmd/... ✅ 48 packages pass, zero failures
gofmt -l cmd/trace/cli/versioninfo/versioninfo.go ✅ clean

Out of scope (intentional follow-ups)

  • 33 pre-existing gofmt issues in untouched files. A separate
    style: gofmt -w . PR will clean them so this PR stays focused on
    the version bump and OSS hygiene.
  • The repo's .golangci.yaml references the embeddedstructfieldcheck
    linter, which the installed golangci-lint version does not recognize
    (Error: unknown linters: 'embeddedstructfieldcheck'). This needs a
    small fix(ci): pin golangci-lint version or relax unknown-linter
    PR — keeping it separate so the version bump is reviewable on its
    own.
  • e2e/ tests not exercised on this PR (they require coding-agent
    binaries on the runner). CI will run them on push.

Test plan

  • go build ./...
  • go vet ./...
  • Full cmd/... + perf/... + redact/... suite with -race
  • .editorconfig and .gitattributes validate (no parser errors)
  • CI on this PR will run lint, license-check, codeql, and the
    relevant e2e workflows

Patel230 added 2 commits May 14, 2026 22:21
…tributes, .editorconfig)

Re-baselines trace's version to 0.2.0 and adds the three top-50 OSS
standard files that were missing.

Version 0.2.0 set in:
  - cmd/trace/cli/versioninfo/versioninfo.go (`var Version = "0.2.0"`)

Aligns trace with the rest of the hawk-eco ecosystem (hawk, tok, eyrie,
yaad, sight, inspect). Build-time `-ldflags` overrides remain the way
release builds pin to a specific version; this is the source-of-truth
default for local `go run`.

CHANGELOG.md gains an [Unreleased] section that captures the re-baseline
and the three new files. The existing 0.1.0 entry is preserved.

New files:
  - .gitattributes — LF normalization (matches WINDOWS.md guidance —
    Windows-only `*.bat`/`*.cmd`/`*.ps1` keep CRLF), binary detection,
    GitHub linguist hints (collapse `go.sum`, `.opencode/package-lock.json`,
    and `.opencode/bun.lock` in PR diffs; mark `docs/**`, `AGENTS.md`,
    `CLAUDE.md`, `WINDOWS.md` as documentation so language stats
    reflect Go).
  - .editorconfig — UTF-8, LF, final newline, trim trailing whitespace
    by default; tabs for Go and Makefile, 2-space indent for YAML/JSON/
    TOML/shell, no-trim for Markdown (preserves the trailing-2-spaces
    line-break syntax).
  - .github/PULL_REQUEST_TEMPLATE.md — Summary / Changes / Privacy &
    redaction impact / Agent compatibility / Testing / Checklist. The
    privacy/redaction section is specific to trace because every change
    in `redact/` can leak PII or secrets if regressed; the agent-
    compatibility section asks contributors to call out which of the
    seven supported agents (Claude Code, Codex, Gemini CLI, OpenCode,
    Cursor, Factory AI Droid, Copilot CLI) they tested against.

Verification:
  - `go build ./...` clean
  - `go vet ./...` clean
  - `go test -race -count=1 -timeout=300s ./perf/... ./redact/... ./cmd/...`
    passes — 48 packages green, zero failures
  - `gofmt -l cmd/trace/cli/versioninfo/versioninfo.go` clean

Out of scope (intentional follow-ups):
  - 33 pre-existing `gofmt` issues in untouched files. A separate
    `style: gofmt -w .` PR will clean them so this PR stays focused
    on the version bump and OSS hygiene.
  - The repo's `.golangci.yaml` references the
    `embeddedstructfieldcheck` linter, which the currently-installed
    golangci-lint version does not recognize. Tracked as a separate
    `fix(ci): pin golangci-lint version or relax unknown-linter` PR.
- VERSION file as single source of truth
- CODEOWNERS for auto-review routing
- Canonical Makefile with standard targets
- release-please config + workflow
- lefthook/pre-commit hooks (conventional commits, fmt, lint, secrets)
- Canonical CI + release GitHub Actions workflows
- Standardized .editorconfig, .gitattributes, CODE_OF_CONDUCT, SECURITY, CONTRIBUTING
- goreleaser config (where applicable)

Part of hawk-eco standardization sweep.
@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

steps:
- name: Run release-please
id: release
uses: googleapis/release-please-action@v4

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@1a80836c5c9d9e5755a25cb59ec6f45a3b5f41a8 # v7
uses: goreleaser/goreleaser-action@v6
@Patel230 Patel230 merged commit fe3b78f into dev May 16, 2026
4 of 9 checks passed
@Patel230 Patel230 deleted the feat/trace-production-hardening branch May 16, 2026 00:54
@Patel230 Patel230 restored the feat/trace-production-hardening branch May 16, 2026 05:26
@Patel230 Patel230 deleted the feat/trace-production-hardening branch May 16, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants